//  头部返回
import Vue from 'vue'

Vue.directive('skeleton-opacity', {
  bind: function (el, binding, vnode) {
    if (!binding.value) {
      el.classList.add('skeleton-opacity')
    } else {
      el.classList.remove('skeleton-opacity')
    }
  },
  update: function (el, binding, vnode) {
    if (binding.value) {
      el.classList.remove('skeleton-opacity')
    } else {
      el.classList.add('skeleton-opacity')
    }
  },
});
